package com.oauth.google.server.global;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.oauth.google.server.service.PicasaOAuthService;
import com.oauth.logging.OAuthLogger;
import com.oauth.service.global.ApplicationGlobalServiceAdapter;
import com.oauth.service.global.beans.OAuthAccessToken;
import com.oauth.service.global.beans.OAuthRequestToken;

@Service
public class PicasaGlobalService extends ApplicationGlobalServiceAdapter {

	private OAuthLogger logger = OAuthLogger.getLogger(this.getClass().getName());

	@Autowired
	private PicasaOAuthService picasaOAuthService;

	/**
	 * @return
	 * @throws Exception
	 * @see com.oauth.facebook.server.service.FacebookService#getAccessToken()
	 */
	public OAuthAccessToken getAccessToken(OAuthRequestToken requestToken) {
		try {
			return picasaOAuthService.getAccessToken(requestToken);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}

	/**
	 * @return
	 * @throws Exception
	 * @see com.oauth.facebook.server.service.FacebookService#getRequestToken()
	 */
	public OAuthRequestToken getRequestToken() {
		try {
			return picasaOAuthService.getRequestToken();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}

}
